# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from apps.views import default, main, index
import os
base_path = os.path.abspath(os.path.dirname(__file__))

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
#     (r'^gisproj/', include('gisproj.foo.urls')),
    (r'^site_media/(.*)', 'django.views.static.serve', {
        'document_root': os.path.join(base_path, 'media'),
        'show_indexes': True,
    }),
    (r'^$', default),
    (r'^main/', main),
    (r'^index/', index, {'dirname':os.path.dirname(__file__)}),
    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/(.*)', admin.site.root),
    
    (r'^prewarning/', include('apps.prewarning.urls')),
)
